Deprecate passing args as positional in DataFrame/Series.interpolate#41510
Merged
jreback merged 5 commits intopandas-dev:masterfrom May 19, 2021
Merged
Conversation
3fe733d to
91ec0d6
Compare
91ec0d6 to
f1ac08b
Compare
| r"for the argument 'self' will be keyword-only" | ||
| ) | ||
| with tm.assert_produces_warning(FutureWarning, match=msg): | ||
| ser.interpolate(0) |
Member
There was a problem hiding this comment.
I would have expected this to raise a TypeError.
| ser = Series([1, 2, 3]) | ||
| msg = ( | ||
| r"Starting with Pandas version 2\.0 all arguments of interpolate except " | ||
| r"for the argument 'self' will be keyword-only" |
Member
There was a problem hiding this comment.
message doesn't need to mention self
Member
|
Maybe allow |
7b6ee76 to
a748a15
Compare
3f6e43b to
e1e0948
Compare
Contributor
|
can you rebase |
…ord-args-interpolate
Contributor
|
thanks @MarcoGorelli |
Contributor
|
@MarcoGorelli if you wouldn't mind adding these to the deprecations list see #30228 (I added this one). also after these are 'done', it may make sense to make a separate deprecation section and/or normalize the language for these in the whatsnew. |
| downcast, | ||
| **kwargs, | ||
| ) | ||
|
|
Member
There was a problem hiding this comment.
if deprecate_nonkeyword_arguments is updated to accept a class argument then maybe could do something like
interpolate = deprecate_nonkeyword_arguments(
version=None, allowed_args=["self", "method"], class="DataFrame"
)(NDFrame.interpolate)
Member
Author
|
will do - and yes, once they're in I'll sort out the whatsnew entry |
TLouf
pushed a commit
to TLouf/pandas
that referenced
this pull request
Jun 1, 2021
JulianWgs
pushed a commit
to JulianWgs/pandas
that referenced
this pull request
Jul 3, 2021
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
inplace#41485